<?php
    
      include_once "blog.php";  
      $connection = connect($config);
      
      $postId = $_GET['id'];
      $post = getPostById($postId, $connection);
	  
	  $posts1 = getAll($connection);
	  $count1=count($posts1);
	  
	  $articlesperPage=10;
      $pageLinksCount =  $count1 /  $articlesperPage;
	  $pageLinksCount = ceil( $pageLinksCount );
	
	   view("post", array( 'post' => $post,'pageLinksCount'=>$pageLinksCount) );
?>